<template>
  <div class="ai-platform-home">
    <!-- Header/Navigation -->
    <header class="header">
      <div class="header-container">
        <div class="logo">
          <div class="logo-icon">
            <svg class="logo-symbol" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
              <rect width="20" height="20" rx="2" fill="white"/>
              <path d="M10 2L2 18H18L10 2Z" fill="#2C2C2C"/>
              <circle cx="10" cy="10" r="3" fill="white"/>
            </svg>
          </div>
          <span class="logo-text">AI教育资源平台</span>
        </div>
        <nav class="navigation">
          <router-link to="/" class="nav-item" :class="{ active: $route.name === 'home' }">首页</router-link>
          <router-link to="/register" class="nav-item">注册</router-link>
        </nav>
      </div>

    </header>

    <!-- Hero Section -->
    <section class="hero-section">
      <div class="hero-container">
        <div class="hero-content">
          <h1 class="hero-title">用AI解锁学习的未来</h1>
          <p class="hero-description">
            探索尖端的AI赋能教育资源，旨在提升您的学习体验，并帮助您为未来的挑战做好准备。
          </p>
          <div class="hero-actions">
            <router-link to="/login" class="btn btn-primary">立即登录</router-link>

          </div>
        </div>
      </div>
    </section>

    <!-- Features Section -->
    <section class="features-section">
      <div class="container">
        <div class="features-grid">
          <div class="feature-card">
            <div class="feature-icon interactive-icon">
              <svg class="icon-shape" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path d="M21 11.5C21 16.1944 16.9706 20 12 20C7.02944 20 3 16.1944 3 11.5C3 6.80558 7.02944 3 12 3C16.9706 3 21 6.80558 21 11.5Z" stroke="#2C2C2C" stroke-width="2"/>
                <path d="M12 20V23M12 20L9 23M12 20L15 23" stroke="#2C2C2C" stroke-width="2" stroke-linecap="round"/>
                <circle cx="12" cy="11" r="3" fill="#2C2C2C"/>
              </svg>
            </div>
            <h3 class="feature-title">互动学习</h3>
            <div class="feature-description">
              使用AI赋能的互动模块，根据您的学习节奏和风格进行适配，以实现最佳的知识掌握效果。
            </div>
          </div>

          <div class="feature-card">
            <div class="feature-icon personalized-icon">
              <svg class="icon-shape" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path d="M3 12H21M3 12L9 6M3 12L9 18" stroke="#2C2C2C" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
                <path d="M9 12H21" stroke="#2C2C2C" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
                <circle cx="15" cy="12" r="2" fill="#2C2C2C"/>
                <circle cx="21" cy="12" r="2" fill="#2C2C2C"/>
              </svg>
            </div>
            <h3 class="feature-title">个性化路径</h3>
            <p class="feature-description">
              AI算法根据您的目标、偏好和进度跟踪创建自定义学习路径。
            </p>
          </div>

          <div class="feature-card">
            <div class="feature-icon resources-icon">
              <svg class="icon-shape" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                <rect x="4" y="4" width="16" height="16" rx="2" stroke="#2C2C2C" stroke-width="2"/>
                <path d="M4 12H20M12 4V20" stroke="#2C2C2C" stroke-width="2"/>
                <circle cx="12" cy="12" r="2" fill="#2C2C2C"/>
              </svg>
            </div>
            <h3 class="feature-title">丰富资源</h3>
            <p class="feature-description">
              访问庞大的AI策展教育内容库，从初学者教程到高级研究论文。
            </p>
          </div>
        </div>
      </div>
    </section>

    <!-- Call to Action Section -->
    <section class="cta-section">
      <div class="container">
        <div class="cta-content">
          <h2 class="cta-title">准备好转变您的学习方式了吗？</h2>
          <p class="cta-description">
            加入数千名已经使用AI加速教育之旅并更快实现目标的学习者。
          </p>
          <div class="cta-actions">
            <router-link to="/register" class="btn btn-large btn-primary">注册账号</router-link>
          </div>
        </div>
      </div>
    </section>
  </div>
</template>

<script setup lang="ts">
import { onMounted } from 'vue'

onMounted(() => {
  // 组件挂载后的初始化逻辑
  console.log('AI教育平台首页已加载')
})
</script>

<style scoped>
.ai-platform-home {
  background: #F8FAFC;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
}

/* Header Styles */
.header {
  position: relative;
  background: white;
  padding: 20px 0;
}

.header-container {
  width: 100%;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: #2C2C2C;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-symbol {
  width: 20px;
  height: 20px;
}

.logo-text {
  color: #1E1E1E;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.navigation {
  display: flex;
  gap: 32px;
}

.nav-item {
  color: #B3B3B3;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

.nav-item.active {
  color: #2C2C2C;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: #2C2C2C;
}

.nav-item:hover {
  color: #2C2C2C;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(90deg, #E2E8F0 0%, #F1F5F9 50%, #F8FAFC 100%);
  padding: 120px 0 80px;
  position: relative;
}

.hero-container {
  max-width: 1272px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  color: #1E1E1E;
  font-size: 48px;
  font-weight: 700;
  line-height: 48px;
  margin-bottom: 32px;
}

.hero-description {
  color: #B3B3B3;
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  margin-bottom: 48px;
  max-width: 747px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: #2C2C2C;
  color: #F5F5F5;
  border: 1px solid #2C2C2C;
  width: 151px;
  height: 49px;
}

.btn-primary:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 44, 44, 0.3);
}

.btn-outline {
  background: transparent;
  color: #2C2C2C;
  border: 1px solid #D9D9D9;
  width: 152px;
  height: 49px;
}

.btn-outline:hover {
  background: #2C2C2C;
  color: #F5F5F5;
}

.btn-large {
  width: 259px;
  height: 61px;
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
}

/* Features Section */
.features-section {
  padding: 80px 0;
  background: white;
}

.container {
  max-width: 1272px;
  margin: 0 auto;
  padding: 0 24px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  background: white;
  border: 1px solid #D9D9D9;
  border-radius: 8px;
  padding: 48px 32px;
  height: 285px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.interactive-icon {
  background: #E3F2FD;
}

.personalized-icon {
  background: #F3E5F5;
}

.resources-icon {
  background: #E8F5E8;
}

.icon-shape {
  width: 24px;
  height: 24px;
}

.feature-title {
  color: #1E1E1E;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  margin-bottom: 24px;
}

.feature-description {
  color: #B3B3B3;
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  flex: 1;
}

/* CTA Section */
.cta-section {
  background: white;
  border: 1px solid #D9D9D9;
  border-radius: 8px;
  margin: 0 ;
  padding: 80px 0;
}

.cta-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.cta-title {
  color: #1E1E1E;
  font-size: 30px;
  font-weight: 700;
  line-height: 36px;
  margin-bottom: 32px;
}

.cta-description {
  color: #B3B3B3;
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  margin-bottom: 48px;
  max-width: 601px;
  margin-left: auto;
  margin-right: auto;
}

.cta-actions {
  display: flex;
  justify-content: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-container,
  .header-container,
  .container {
    max-width: 100%;
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 20px;
  }

  .navigation {
    gap: 20px;
  }

  .hero-title {
    font-size: 36px;
    line-height: 40px;
  }

  .hero-description {
    font-size: 18px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .cta-title {
    font-size: 24px;
    line-height: 30px;
  }

  .cta-description {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 80px 0 60px;
  }

  .hero-title {
    font-size: 28px;
    line-height: 32px;
  }

  .hero-description {
    font-size: 16px;
    line-height: 24px;
  }

  .feature-card {
    padding: 32px 24px;
    height: auto;
  }

  .btn {
    width: 100% !important;
    max-width: 280px;
  }
}
</style>